package com.rerun.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.rerun.common.bean.Rest;
import com.rerun.entity.Job;
import com.rerun.entity.JobTag;
import com.rerun.entity.vo.JobDetailVo;
import com.rerun.entity.vo.JobMessageVo;
import com.rerun.vo.park.JobValidVo;

import java.util.List;
import java.util.Map;

/**
 * The interface Job service.
 *
 * @author Administrator
 */
public interface IJobService extends IService<Job> {
    /**
     * Add job rest.
     *
     * @param job the job
     * @return the rest
     */
//发布职位（先添加后展示）crud
    Rest addJob(Job job);

    /**
     * Update job rest.
     *
     * @param job the job
     * @return the rest
     */
    Rest updateJob(Job job);

    /**
     * Show job rest.
     *
     * @param parkid the parkid
     * @return the rest
     */
    Rest showJob(Long parkid);

    /**
     * 添加职位
     *
     * @param job     the job
     * @param jobTags the job tags
     * @return boolean boolean
     */
    boolean addJob(Job job, List<JobTag> jobTags);

    /**
     * 编辑职位
     *
     * @param job     the job
     * @param jobTags the job tags
     * @return boolean boolean
     */
    boolean editJob(Job job, List<JobTag> jobTags);

    /**
     * 职位详情
     *
     * @param id the id
     * @return job detail
     */
    JobValidVo getJobDetail(String id);

    /**
     * Find page by intention list.
     *
     * @param page     the page
     * @param memberId the member id
     * @return the list
     */
    Page<Job> findPageByIntention(Page<Job> page, String memberId);

    /**
     * Find new jobs page.
     *
     * @param page the page
     * @return the page
     */
    Page<Job> findNewJobs(Page<Job> page);

    /**
     * Find page by work district page.
     *
     * @param page         the page
     * @param workCity     the work city
     * @param workDistrict the work district
     * @param keyWord      the key word
     * @param edu          the edu
     * @param salaryRange  the salary range
     * @param workYears    the work years
     * @return the page
     */
    Page<Job> findPageByWorkDistrict(Page<Job> page, String workCity, String workDistrict, String keyWord, String edu, String salaryRange, String workYears);


    /**
     * Gets job detail and yoyo park.
     *
     * @param id the id
     * @return the job detail and yoyo park
     */
    JobDetailVo getJobDetailAndYoyoPark(String id);

    /**
     * Find available job by id job.
     *
     * @param jobId the job id
     * @return the job
     */
    Job findAvailableJobById(String jobId);

    /**
     * Job details list.
     *
     * @param ids the ids
     * @return the list
     */
    List<JobDetailVo> jobDetails(List<String> ids);

    /**
     * Gets job details by id.
     *
     * @param jobId the job id
     * @return the job details by id
     */
    JobDetailVo getJobDetailById(String jobId);

    /**
     * 后台职位管理列表
     *
     * @param map        the map
     * @param pageNumber the page number
     * @param pageSize   the page size
     * @return the list
     * @throws Exception the exception
     */
    List<JobMessageVo> showjobMessage( Map<String, Object > map,Integer pageNumber, Integer pageSize) throws Exception;

    /**
     * 编辑回显
     *
     * @param id the id
     * @return the job message vo
     */
    JobMessageVo findjobMessage( String id);

    /**
     * 后台职位管理列表编辑
     *
     * @param JobMessage the job message
     * @return the rest
     */
    Rest updateJobMessage(JobMessageVo JobMessage);


    /**
     * Find available job by park id list.
     *
     * @param parkId the park id
     * @return the list
     */
    List<Job> findAvailableJobByParkId(String parkId);
}
